package cn.sccl.dirms.topo.util;

import java.io.File;
import java.io.FileInputStream;
import java.text.DateFormat;
import java.text.SimpleDateFormat;
import java.util.Calendar;
import java.util.TimeZone;

/**
 * Created by liuchuan on 1/19/17.
 */
public class UUIDUtil {
    static DateFormat df = new SimpleDateFormat("yyyy-MM-dd H:m:s");
    static TimeZone zone = TimeZone.getTimeZone("GMT-8:00");
    static Calendar cal = Calendar.getInstance(zone);
    public static void main(String[] arg)throws Exception{
//        System.out.println(UUID.randomUUID().toString().replace("-",""));
//        double d = 0x7FFFFFFF;
//        String name = "htisosfalskdjfas";
//        if(name.length() >= 5){
//            name = name.substring(0,4);
//        }
//        System.out.print(name);

        double d = 45000;
        double x = ((double)85) /100;
        System.out.println(x);
        System.out.println(d*x);
        System.out.println(85.0/100);
        String s = "ABCD";

        System.out.println(new UUIDUtil().hashCode());
        System.out.println(new UUIDUtil().hashCode());
        System.out.println(new UUIDUtil().hashCode());

//        char[] var2 = value;
//
//        for(int var3 = 0; var3 < this.value.length; ++var3) {
//            var1 = 31 * var1 + var2[var3];
//        }
//
//        this.hash = var1;

//        OffsetDateTime offsetDateTime = OffsetDateTime.now().withOffsetSameInstant(ZoneOffset.UTC);
//        System.out.println(offsetDateTime.toString());
//        System.out.println(df.format(cal.getTime()));

//        throwtest();
    }





    private static void throwtest() {
        try{
            File file = new File("/kill.txt");
            FileInputStream fileInputStream = new FileInputStream(file);
        }catch (Exception e){
            System.out.print("exe");
        }
        System.out.print("rturn");
    }
}
